<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
 
    <body>

        <ui:composition >

            <p:panel >
                <h:panelGrid columns="2" >
                    <p:commandButton id="btnSalvar" 
                                     value="Salvar F10" 
                                     icon="iconSalvar"
                                     action="#{eventoBean.salvar()}"
                                     update=":geral,:geral:mensagem, :geral:pnlProcesso"
                                     />
                    <p:commandButton value="Voltar Esc"
                                     id="btnVoltar"
                                     action="#{eventoBean.voltar()}"
                                     icon="iconFechar"
                                     update=":geral:pnlProcesso, :geral:mensagem"/>
                </h:panelGrid>
            </p:panel>


            <h:panelGrid columns="2" >
                <h:outputText  value="Inicio do Evento: "/>
                <p:calendar id="inicio" value="#{eventoBean.evento.inicio}" 
                            label="Inicio Evento" pattern="dd/MM/yyyy"/>

                <h:outputText value="Final do Evento: "/>
                <p:calendar  id="final" value="#{eventoBean.evento.final1}" 
                             label="Final Evento" pattern="dd/MM/yyyy"/>

                <h:outputText value="Nome do Evento: "/>
                <h:inputText id="nomeE" 
                             value="#{eventoBean.evento.nome}" />

                <h:outputText  value="Crie uma Senha: "/>
                <h:inputText id="senha" value="#{eventoBean.evento.senha}" />

                <h:outputText value="Status do Evento: "/>
                <h:selectOneMenu id="status"
                                 style="width: 200px" value="#{eventoBean.evento.status}">
                    <f:selectItem itemLabel="Selecione o Status" itemValue=""/>
                    <f:selectItem itemLabel="Iniciado" itemValue="I"/>
                    <f:selectItem itemLabel="Finalizado" itemValue="F"/>
                </h:selectOneMenu>

                <h:outputText value="Descrição do Evento: "/>
                <h:inputTextarea id="descricaoE" value="#{eventoBean.evento.descricao}" 
                                 label="Descricao" rows="5" cols="40"
                                 style="width: 300px; height: 100px"
                                 />
            </h:panelGrid>

        </ui:composition>

    </body>
</html>
